package com.example.controller;

import java.util.Random;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.service.SenderService;

@RestController
public class RocketMQController {

	@Resource
	private SenderService senderService;

	@GetMapping(value = "/rocketMQ/sendMsg")
	public String sendMsg() throws Exception {
		senderService.send("hello message" + (new Random().nextInt(100)));
		return "send ok";
	}

}
